﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using KalevaAalto.DataPart.Models;
using SqlSugar;

namespace KalevaAalto.DataPart.Excel.Base
{
    public abstract class BaseRows : BaseWorksheetElement, IEnumerable<BaseRows>
    {
        public BaseRows(BaseWorksheet worksheet) : base(worksheet)
        {
        }

        public abstract IStyle Sytle { get; }

        public virtual int Count => this.Count();

        public virtual BaseRows this[int index] => this.ElementAt(index - 1);

        public abstract double Height { get; set; }

        public abstract IEnumerator<BaseRows> GetEnumerator();
        IEnumerator IEnumerable.GetEnumerator()=>GetEnumerator();
        
    }
}
